﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using School;

namespace TestSchool
{
    [TestClass]
    public class StudentTest
    {
        [TestMethod]
        public void TestStudentConstructor()
        {
            string name = "Veselin";
            int number = 10000;
            Student student = new Student(name, number);

            Assert.AreEqual(name, student.Name);
            Assert.AreEqual(number, student.UniqueNumber);
        }

        [TestMethod]
        [ExpectedException(typeof(ArgumentNullException))]
        public void TestStudentConstructor_InitializeWithNullName()
        {
            string name = null;
            int number = 10000;
            Student student = new Student(name, number);
        }

        [TestMethod]
        [ExpectedException(typeof(ArgumentException))]
        public void TestStudentConstructor_InitializeWithEmptyName()
        {
            string name = string.Empty;
            int number = 10000;
            Student student = new Student(name, number);
        }

        [TestMethod]
        [ExpectedException(typeof(ArgumentException))]
        public void TestStudentConstructor_InvalidUniqueNumber()
        {
            string name = "Veselin";
            int number = 0;
            Student student = new Student(name, number);
        }
    }
}
